from ShapeAndRasterToolBox import UFP
from multiprocessing import Process, Pool, Manager
import os


def task_02():
    newList = range(10)

    return


def task_03():
    Manager.
    pool = Pool(processes=2)
    pool.map(task_02, )
    return


def task_01():
    # imagefilepath = r"E:\洋洋误检背景收集图\J50E010014_3.jpg"
    imagedir = r"E:\洋洋误检背景收集图"
    savedir = r"E:\download\Links"
    winsize = [1000, 1000]
    stride = [500, 500]
    imagefilepathlist = UFP.GetSubFile(imagedir)
    for imagefilepath in imagefilepathlist:
        UFP.ClipImage(imagefilepath, winsize, stride, savedir)
    return


if __name__=="__main__":
    task_01()